package com.minglead.springboot.platform.sys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.minglead.springboot.common.crud.CrudService;
import com.minglead.springboot.platform.sys.dao.FileInfoDao;
import com.minglead.springboot.platform.sys.entity.FileInfo;


/**
 * 机构Service
 */
@Service
@Transactional(readOnly = true)
public class FileInfoService extends CrudService<FileInfoDao, FileInfo> {
	
	@Autowired
	private FileInfoDao fileInfoDao;
	
	
	@Transactional(readOnly = false)
	public void delete(String id){
		dao.delete(id);
	}

	@Transactional(readOnly = true)
	public List<FileInfo> findList(String businessId, String businessKey){
		List<FileInfo> fileInfos = fileInfoDao.findFile(businessId, businessKey);
		return fileInfos;
	}
	
	@Transactional(readOnly = false)
	public void update(String id, String sessionId){
		fileInfoDao.updateTmp(id, sessionId);
	}
	
//	@Transactional(readOnly = false)
//	public void delete(Office office) {
////		super.delete(office);
//		UserUtils.removeCache(UserUtils.CACHE_OFFICE_LIST);
//	}
	 
}
